package com.his.dao.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

/**
 * <p>
 * 
 * </p>
 *
 * @author fall
 * @since 2022-11-28
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_registration")
@ApiModel(value = "Registration对象", description = "")
public class Registration extends Model<Registration> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "registration_id", type = IdType.AUTO)
    private Integer registrationId;

    @TableField("doctor_id")
    private Integer doctorId;

    @TableField("patient_id")
    private Integer patientId;

    @TableField("date")
    private String date;

    @ApiModelProperty("是否是预约号")
    @TableField("is_appointment")
    private Integer isAppointment;

    @ApiModelProperty("挂号单是否完成")
    @TableField("is_complete")
    private Integer isComplete;

    @ApiModelProperty("是否完成支付")
    @TableField("is_payment")
    private Integer isPayment;

    @TableField("diagnose")
    private String diagnose;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @TableField("is_delete")
    @TableLogic
    private Integer isDelete;


    @Override
    public Serializable pkVal() {
        return this.registrationId;
    }

}
